<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>设备配置</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
    <script src="../lib/layui/layui.js" type="text/javascript" ></script>
    <script src="../js/cdcardpassmgr/deviceMgr.js" type="text/javascript" ></script>
    <script type="text/html" id="barOperate">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="config">设置</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    </script>
</head>
<body class="layui-layout-body" style="background-color:white;padding: 10px">

<div id="configDiv" style="display: none">
    <form class="layui-form" id="paramconfig_form" lay-filter="paramconfig_form" style="margin-top:1%">
        <input style="display: none" id="configId" name="id">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 120px">设备别名:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" lay-verify="required" name="nickName" id="nickName"/>
                </div>
                <label class="layui-form-label" style="width: 120px">设备位置:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" lay-verify="required" name="location" id="location"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 120px">设备序列号:</label>
            <div class="layui-input-inline">
                <input type="text" name="serialNum" class="layui-input" placeholder="MC-5824T20114036" id="serialNum">
            </div>
            <label class="layui-form-label" style="width: 120px">通讯密码:</label>
            <div class="layui-input-inline">
                <input class="layui-input" lay-verify="required" placeholder="16进制,例:FFFFFFFF" name="password" id="password"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 120px">记录代码:</label>
            <div class="layui-input-inline">
                <input class="layui-input" placeholder="01" name="recordCode" id="recordCode" autocomplete="off" lay-verify="required"/>
            </div>
            <label class="layui-form-label" style="width: 120px">记录序号:</label>
            <div class="layui-input-inline">
                <input class="layui-input" placeholder="00000001" name="recordIndex" id="recordIndex" autocomplete="off" lay-verify="required|number"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 120px">读取数据量:</label>
            <div class="layui-input-inline">
                <input class="layui-input" placeholder="00000010" min-count="1" max-count="20" name="readCount" id="readCount" autocomplete="off" lay-verify="required|number|readCount"/>
            </div>
            <label class="layui-form-label" style="width: 120px">自动读取间隔时间:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="intervalSecond" min-count="5" max-count="59" placeholder="自动读取间隔时间" id="intervalSecond" autocomplete="off" lay-verify="required|number|interval"/>
            </div><div style="padding-top: 8px;">秒</div>

        </div>
        <div class='layui-input-block' >
            <button class="layui-btn" id="config_form" lay-submit="" lay-filter="config_form">确定</button>
            <button class="layui-btn" id="cancel_config">取消</button>
        </div>
    </form>
</div>

<div class="layui-tab-brief" lay-filter="docDemoTabBrief">
    <div>
        <div class="layui-row">
            <div class="layui-col-xs10">
                <div style="margin-top:10px; height: 45px">
                    <form class="layui-form">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <div class="layui-form-label">设备别名:</div>
                                <div class="layui-input-inline">
                                    <input class="layui-input" id="searcheNickName" autocomplete="off"
                                           placeholder="输入设备别名搜索">
                                </div>
                                <div class="layui-form-label">配置状态:</div>
                                <div class="layui-input-inline">
                                    <select name="searchConfigStatus" id="searchConfigStatus" lay-filter="searchConfigStatus">
                                        <option value="">全部</option>
                                        <option value="0">未配置</option>
                                        <option value="1">已配置</option>
                                    </select>
                                </div>
                                <button class="layui-btn" lay-submit="" lay-filter="queryDevice" >查询</button>
                                <button class="layui-btn layui-btn-normal" type="button" id="syncDevice">同步设备</button>
                                <button class="layui-btn"  type="button" onclick="reload()">重置</button>
                            </div>

                        </div>
                    </form>
                </div>
                <div class="layui-tab-item layui-show" style="margin-left: 10px">
                    <table class="layui-hide" id="deviceTable" lay-filter="deviceTable" style="width: 100%;"></table>
                </div>

            </div>

        </div>

    </div>
</div>

</body>

</html>